<!-- 新增/编辑 组织机构 -->
<template>
  <a-modal :footer="false" v-model:visible="visible" width="85vw" title="费用明细" @close="closeFn" unmount-on-close>
    <div style="max-height: 80vh">
      <shortordercost v-if="orderId" :orderId="orderId" />
    </div>
  </a-modal>
</template>

<script setup>
  import { provide, ref } from 'vue'
  import shortordercost from '@/views/order/short-order/detail/components/short-order-cost.vue'

  // 广播当前订单id
  const orderId = ref()
  const orderDetail = ref()
  provide('currentShortOrderId', orderId)
  provide('getShortOrderDetail', orderDetail)

  const emit = defineEmits(['close'])

  const visible = ref(false)
  const open = (record) => {
    orderId.value = record.id
    orderDetail.value = record
    visible.value = true
  }
  const closeFn = () => {
    emit('close')
  }
  defineExpose({
    open,
  })
</script>
<style lang="less" scoped>
  .menus {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
    .menus-item {
      color: #4e5969;
      font-size: 28rpx;
      padding: 5px 16px;
      margin-right: 12px;
      font-weight: 400;
      cursor: pointer;
    }
    .active {
      border-radius: 30px;
      color: #1890ff;
      font-weight: 500;
      background: #f2f3f5;
    }
  }
</style>
